window.onload = function () {
    let box1 = document.getElementsByClassName('box1')[0];
    console.log(box1);

    box1.onclick=function(){
        console.log('点击了box1');
    }
}

